package com.sdry.web.controller.cb;

import com.sdry.entity.cb.User;
import com.sdry.service.cb.UserService;
import com.sdry.utils.DataGridResult;
import com.sdry.web.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @ClassName: UserController
 * @Description: 测试User,登陆模拟
 * @Author cb
 * @Date 2018/4/24 20:01
 * @version 1.0
 */
@Controller
public class UserController extends BaseController{

    @Resource
    private UserService userService;

    /**
     * 登陆
     */
    @RequestMapping("/login")

    public String login() {

        Map map = new HashMap();
        map.put("name","cb");
        map.put("pass","123");




        return "cb";
    }

    @RequestMapping("insert")
    public void insert() {
        long uid = 6L;
        User user = new User(uid,"admin","234");

        userService.insert(user);



    }
}
